// 提示公共类
export const sToast = ( title,duration = 2000 ) => {
		uni.showToast({
			title:title,
			icon:'none',
			duration:duration
		})
}
// 返回上一页公共类
export const back = (delta = 1 ,time = 0) => {
	setTimeout(()=>{
		uni.navigateBack({
			delta:delta
		})
	},time)
}
// 打开新页面公共类 0普通跳转  1底部跳转 2关闭当前页面跳转
export const open = ( URL , type = 0 , time ) => {
		setTimeout(()=>{
			if( type == 0 ){
				uni.navigateTo({
					url:URL
				})
			}else if( type == 1 ) {
				uni.switchTab({
					url:URL
				})
			}else if( type == 2 ){
				uni.reLaunch({
					url:URL
				})
			}
		},time)
}